package org.langqiao.rpc;

import java.net.MalformedURLException;

import com.caucho.hessian.client.HessianProxyFactory;

public class BasicClient {
	public static void main(String[] args) throws MalformedURLException {
		String url = "http://127.0.0.1:8087/JavaEE/hello";
		HessianProxyFactory factory = new HessianProxyFactory();
		BasicAPI basic = (BasicAPI)factory.create(BasicAPI.class, url);
		System.out.println(basic.hello());
		System.out.println(basic.getUser().getUserName());
		System.out.println(basic.getUser().getPassword());
		basic.setGreeting("HelloGreeting");
		System.out.println("hello:" + basic.hello());
	}
}
